#-*-coding:utf-8-*-
import hou
class MotionAndAudio(object):
    def __init__(self):
        super(MotionAndAudio,self).__init__()

    def setMaximumRealtimeTimeSliceSize(self,value):
        hou.setPreference('chops.maxtimeslice.val', str(value))
        # print('setMaximumRealtimeTimeSliceSize')


    def getMaximumRealtimeTimeSliceSize(self):
        return hou.getPreference('chops.maxtimeslice.val')
        # print('getMaximumRealtimeTimeSliceSize')


    def setEnableTimeSliceFlagWhenCreatingCHOPs(self,bool):
        if bool == True:
            hou.setPreference('chops.deftimeslice.val','1')
            # print('1')
        else:
            hou.setPreference('chops.deftimeslice.val','0')
            # print('0')

    def getEnableTimeSliceFlagWhenCreatingCHOPs(self):
        return hou.getPreference('chops.deftimeslice.val')
        # print('getEnableTimeSliceFlagWhenCreatingCHOPs')



    def setMinimalRealtimeCooks(self,bool):
        if bool == True:
            hou.setPreference('chops.mincooks.val','1')
            # print('1')
        else:
            hou.setPreference('chops.mincooks.val','0')
            # print('0')

    def getMinimalRealtimeCooks(self):
        return hou.getPreference('chops.mincooks.val')
        # print('getMinimalRealtimeCooks')



